import request from '@/http/http'

// 首页专题推荐管理 --- /home/recommendSubject/list，分页查询推荐
export const ApiRecommendSubjectList = (params: any): RSP<IBrandListResponse<any>> => request.get('/home/recommendSubject/list', { params })

// 首页专题推荐管理 --- /home/recommendSubject/update/sort/{id},修改推荐排序
export const ApiRecommendSubjectUpdateSort = (params:any): RSP<number> => request.post(`/home/recommendSubject/update/sort/${params.id}?sort=${params.sort}&id=${params.id}`)

// 首页专题推荐管理 --- /home/recommendSubject/update/recommendStatus，批量修改推荐状态
export const ApiRecommendRecommendStatus = (params: any): RSP<number> => request.post(`/home/recommendSubject/update/recommendStatus?ids=${params.ids}&recommendStatus=${params.recommendStatus}`)

// 首页专题推荐管理 --- /home/recommendSubject/delete,批量删除推荐
export const ApirecommendSubjectDelete = (id: number[] | number): RSP<number> => request.post(`/home/recommendSubject/delete?ids=${id}`)

// 商品专题管理 --- /subject/list，根据专题名称分页获取专题
export const ApiSubjectList = (params: any): RSP<any> => request.get(`/subject/list`, { params })


// 首页人气推荐管理 --- /home/recommendProduct/create,添加首页推荐
export const ApirRecommendProductCreate = (params: any): RSP<any> => request.post(`/home/recommendProduct/create`, params)